HA$PBExportHeader$w_error.srw
forward
global type w_error from window
end type
type dw_error from datawindow within w_error
end type
type cb_2 from commandbutton within w_error
end type
type cb_1 from commandbutton within w_error
end type
type gb_1 from groupbox within w_error
end type
end forward

global type w_error from window
integer x = 800
integer y = 400
integer width = 1806
integer height = 1284
boolean titlebar = true
string title = "Exception System"
boolean controlmenu = true
windowtype windowtype = response!
long backcolor = 67108864
dw_error dw_error
cb_2 cb_2
cb_1 cb_1
gb_1 gb_1
end type
global w_error w_error

event open;string ls_tipo, ls_error, ls_mesage, ls_where, ls_object, ls_event, ls_line, ls_pc
datetime ldt_feac
dw_error.insertrow (1)

//ls_tipo  = 'Power Builder'  
ls_tipo  = 'PB115'  
ls_error = string(error.number)
ls_mesage= error.text
ls_where = error.windowmenu
ls_object= error.object
ls_event = error.objectevent
ls_line  = string(error.line)
ldt_feac = datetime(today(), now())

dw_error.setitem (1,"errornum",string(error.number))
dw_error.setitem (1,"message" ,error.text)
dw_error.setitem (1,"where"   ,error.windowmenu)
dw_error.setitem (1,"object"  ,error.object)
dw_error.setitem (1,"event"   ,error.objectevent)
dw_error.setitem (1,"line"    ,string(error.line)) 
//rollback;
//insert into vca_errores (error_tipo, error_number, error_text, error_where, error_object, error_event, error_line, error_fecha, error_pc)
//					  values (:ls_tipo  , :ls_error   , :ls_mesage, :ls_where  , :ls_object  , :ls_event   , :ls_line  , :ldt_feac  , :ls_pc  );
//f_val_sql('Error al insertar errores <line 22>')
//commit;
end event

on w_error.create
this.dw_error=create dw_error
this.cb_2=create cb_2
this.cb_1=create cb_1
this.gb_1=create gb_1
this.Control[]={this.dw_error,&
this.cb_2,&
this.cb_1,&
this.gb_1}
end on

on w_error.destroy
destroy(this.dw_error)
destroy(this.cb_2)
destroy(this.cb_1)
destroy(this.gb_1)
end on

type dw_error from datawindow within w_error
integer x = 101
integer y = 88
integer width = 1577
integer height = 852
integer taborder = 20
string title = "none"
string dataobject = "d_error1"
boolean border = false
boolean livescroll = true
end type

type cb_2 from commandbutton within w_error
integer x = 937
integer y = 1020
integer width = 402
integer height = 112
integer taborder = 30
integer textsize = -8
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Verdana"
string text = "Continuar"
end type

event clicked;close (parent)
end event

type cb_1 from commandbutton within w_error
integer x = 411
integer y = 1020
integer width = 402
integer height = 112
integer taborder = 20
integer textsize = -8
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Verdana"
string text = "Salir "
end type

event clicked;halt close;
end event

type gb_1 from groupbox within w_error
integer x = 69
integer y = 40
integer width = 1655
integer height = 932
integer taborder = 10
integer textsize = -8
integer weight = 700
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Verdana"
long textcolor = 33554432
long backcolor = 67108864
end type

